package org.linlinjava.litemall.db.service;

import org.linlinjava.litemall.db.dao.LitemallRentNotReturnMapper;
import org.linlinjava.litemall.db.domain.LitemallRentNotReturn;
import org.linlinjava.litemall.db.domain.LitemallRentNotReturnExample;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author Administrator
 */
@Service
public class LitemallRentNotReturnService {
    @Resource
    private LitemallRentNotReturnMapper rentNotReturnMapper;

    public LitemallRentNotReturn findById(Integer id) {
        return rentNotReturnMapper.selectByPrimaryKey(id);
    }

    public LitemallRentNotReturn findBySn(String sn) {
        LitemallRentNotReturnExample example = new LitemallRentNotReturnExample();
        example.or().andOrderSnEqualTo(sn).andDeletedEqualTo(false);
        return rentNotReturnMapper.selectOneByExample(example);
    }


}
